package com.zenchn.entity;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;

import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;

/**
 * 区域编辑映射
 *
 * @author dingxinfa
 * @date 2020-04-20
 **/
@ApiModel(value="区域编辑映射",description="区域编辑映射对象")
public class AreaModifyDO {

    @NotEmpty(message = "区域编码不能为空")
    @ApiModelProperty(value="区域编码")
    private String code;

    @NotEmpty(message = "区域名称不能为空")
    @ApiModelProperty(value="区域名称")
    private String name;

    @ApiModelProperty(value="城乡分类编码")
    private String category;

    @NotNull(message = "是否启用不能为空")
    @ApiModelProperty(value="是否启用")
    private Boolean isEnable;

    @ApiModelProperty(value="备注")
    private String memo;

    public String getCode() {
        return code;
    }

    public void setCode(String code) {
        this.code = code;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getCategory() {
        return category;
    }

    public void setCategory(String category) {
        this.category = category;
    }

    public Boolean getIsEnable() {
        return isEnable;
    }

    public void setIsEnable(Boolean isEnable) {
        this.isEnable = isEnable!=null?isEnable:true;
    }

    public String getMemo() {
        return memo;
    }

    public void setMemo(String memo) {
        this.memo = memo;
    }

    @Override
    public String toString() {
        return "AreaModifyDO{" +
                "code='" + code + '\'' +
                ", name='" + name + '\'' +
                ", category='" + category + '\'' +
                ", isEnable=" + isEnable +
                ", memo='" + memo + '\'' +
                '}';
    }
}
